#pragma once

#include <vector>

#include "Globals.h"
#include "GameObject.h"
//#include "Tile.h"
#include "Scene.h"
#include "CollisionArbiter.h"
#include "SignalSlot.h"

namespace game_engine
{

// Forward declaration
//class Scene;

/*!
 * \class SceneManager
 * \brief 
 */
class SceneManager
{
///////////////////////////////////////////////////////////////////////////////
// Attribute definition
///////////////////////////////////////////////////////////////////////////////
public:
    cSlot <SceneManager, INT32, GameObject*> slotMovedObject;

protected:
    Scene *scene;
    CollisionArbiter collisionArbiter;
    vector<GameObject*> movedObjects;

///////////////////////////////////////////////////////////////////////////////
// Method definition
///////////////////////////////////////////////////////////////////////////////
public:
    // Constructors and Destructors
    SceneManager(void);
    SceneManager(Scene *parent);
    virtual ~SceneManager(void);

    // Others
    virtual void initialize(void) throw(...) = 0;
    virtual const BOOL update(void) throw(...) = 0;
    virtual void finalize(void) throw(...) = 0;

    // Slots
    INT32 addMovedObject(GameObject *obj);

    // Setters
    void setScene(Scene *parent);

protected:
    virtual void processWorldCollision(GameObject *obj);
    const vector<GameObject*> objectsWithCollider(void) const;

//private:
//    const vector<GameObject*> objectsWithCollider(void) const;

};

}
